import request from '@/utils/request'

// 查询户绑定列表
export function listDoorBindQuery(query) {
  return request({
    url: '/fund/doorBindQuery/list',
    method: 'get',
    params: query
  })
}

// 查询户绑定详细
export function getDoorBindQuery(bindId) {
  return request({
    url: '/fund/doorBindQuery/' + bindId,
    method: 'get'
  })
}

// 新增户绑定
export function addDoorBindQuery(data) {
  return request({
    url: '/fund/doorBindQuery',
    method: 'post',
    data: data
  })
}

// 修改户绑定
export function updateDoorBindQuery(data) {
  return request({
    url: '/fund/doorBindQuery',
    method: 'put',
    data: data
  })
}

// 删除户绑定
export function delDoorBindQuery(bindId) {
  return request({
    url: '/fund/doorBindQuery/' + bindId,
    method: 'delete'
  })
}


// 获取小区信息
export function getAreaBindInfo() {
  return request({
    url: '/fund/doorBindQuery/getAreaBindInfo',
    method: 'get'
  })
}
// 获取小区信息
export function getAreaBindInfo1(areaName) {
  return request({
    url: '/fund/doorBindQuery/getAreaBindInfo1/'+areaName,
    method: 'get'
  })
}

// 获取楼宇信息
export function getGroupBindInfo(areaName) {
  return request({
    url: '/fund/doorBindQuery/getGroupBindInfo/'+areaName,
    method: 'get'
  })
}

// 获取单元信息
export function getUnitBindInfo(areaName,groupName) {
  return request({
    url: '/fund/doorBindQuery/getUnitBindInfo/'+areaName+"/"+groupName,
    method: 'get'
  })
}

// 获取户信息
export function getDoorBindInfo(areaName,groupName,unitName) {
  return request({
    url: '/fund/doorBindQuery/getDoorBindInfo/'+areaName+"/"+groupName+"/"+unitName,
    method: 'get'
  })
}

export function getBindInfo(houseId) {
  return request({
    url: '/fund/doorBindQuery/getBindInfo/'+houseId,
    method: 'get'
  })
}
